<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/staffTemplate.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content1">
        <script type="text/javascript" src="../../ckeditor/ckeditor.js"></script>
        <div class="col-6 ol-lg-6 col-sm-6">
            <h:form id="form">
                <p:dataTable value="#{staffInbox.allMessage}" var="mc" paginator="true" paginatorPosition="bottom" rows="10" >
                    <p:column>
                        <f:facet name="header">Sender</f:facet>
                        <h:outputText value="#{mc.accountsBySenderId.fullName}" />
                    </p:column>
                    <p:column>
                        <f:facet name="header">Send time</f:facet>

                        <h:outputText value="#{mc.entities.startTime}" />
                    </p:column>
                    <p:column>
                        <f:facet name="header">Title</f:facet>
                        <h:outputText value="#{mc.entities.title}" />
                    </p:column>
                    <p:column>
                        <f:facet name="header">Attachment</f:facet>

                    </p:column>
                    <p:column>
                        <f:facet name="header">Options</f:facet>
                        <h:commandButton styleClass="btn btn-success icon-search" value="View" action="#{staffInbox.read(mc)}">
                          
                        </h:commandButton>

                        <h:commandButton styleClass="btn btn-danger icon-ban-circle" value="Delete"  action="#{staffInbox.toTrash(mc)}">
                            
                        </h:commandButton>
                    </p:column>
                </p:dataTable>
            </h:form>

        </div>
    </ui:define>

</ui:composition>
